package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.RefundOrder;
import com.nondo.dean.pay.domain.RefundOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface RefundOrderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=RefundOrderSqlProvider.class, method="countByExample")
    long countByExample(RefundOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=RefundOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(RefundOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_refund_order",
        "where refund_order_id = #{refundOrderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String refundOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_refund_order (refund_order_id, pay_order_id, ",
        "channel_pay_order_no, mch_id, ",
        "mch_refund_no, channel_id, ",
        "pay_amount, refund_amount, ",
        "currency, status, ",
        "result, client_ip, ",
        "device, remark_info, ",
        "channel_user, user_name, ",
        "channel_mchid, channel_order_no, ",
        "channel_err_code, channel_err_msg, ",
        "extra, notify_url, ",
        "param1, param2, ",
        "expire_time, refund_succ_time, ",
        "create_time, update_time)",
        "values (#{refundOrderId,jdbcType=VARCHAR}, #{payOrderId,jdbcType=VARCHAR}, ",
        "#{channelPayOrderNo,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, ",
        "#{mchRefundNo,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, ",
        "#{payAmount,jdbcType=BIGINT}, #{refundAmount,jdbcType=BIGINT}, ",
        "#{currency,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, ",
        "#{result,jdbcType=TINYINT}, #{clientIp,jdbcType=VARCHAR}, ",
        "#{device,jdbcType=VARCHAR}, #{remarkInfo,jdbcType=VARCHAR}, ",
        "#{channelUser,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, ",
        "#{channelMchid,jdbcType=VARCHAR}, #{channelOrderNo,jdbcType=VARCHAR}, ",
        "#{channelErrCode,jdbcType=VARCHAR}, #{channelErrMsg,jdbcType=VARCHAR}, ",
        "#{extra,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR}, ",
        "#{param1,jdbcType=VARCHAR}, #{param2,jdbcType=VARCHAR}, ",
        "#{expireTime,jdbcType=TIMESTAMP}, #{refundSuccTime,jdbcType=TIMESTAMP}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(RefundOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=RefundOrderSqlProvider.class, method="insertSelective")
    int insertSelective(RefundOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=RefundOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="refund_order_id", property="refundOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_pay_order_no", property="channelPayOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_refund_no", property="mchRefundNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="pay_amount", property="payAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="refund_amount", property="refundAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark_info", property="remarkInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user", property="channelUser", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mchid", property="channelMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_code", property="channelErrCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_msg", property="channelErrMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_succ_time", property="refundSuccTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<RefundOrder> selectByExampleWithRowbounds(RefundOrderExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=RefundOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="refund_order_id", property="refundOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_pay_order_no", property="channelPayOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_refund_no", property="mchRefundNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="pay_amount", property="payAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="refund_amount", property="refundAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark_info", property="remarkInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user", property="channelUser", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mchid", property="channelMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_code", property="channelErrCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_msg", property="channelErrMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_succ_time", property="refundSuccTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<RefundOrder> selectByExample(RefundOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "refund_order_id, pay_order_id, channel_pay_order_no, mch_id, mch_refund_no, ",
        "channel_id, pay_amount, refund_amount, currency, status, result, client_ip, ",
        "device, remark_info, channel_user, user_name, channel_mchid, channel_order_no, ",
        "channel_err_code, channel_err_msg, extra, notify_url, param1, param2, expire_time, ",
        "refund_succ_time, create_time, update_time",
        "from pay_refund_order",
        "where refund_order_id = #{refundOrderId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="refund_order_id", property="refundOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="pay_order_id", property="payOrderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_pay_order_no", property="channelPayOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_refund_no", property="mchRefundNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="pay_amount", property="payAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="refund_amount", property="refundAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark_info", property="remarkInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user", property="channelUser", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mchid", property="channelMchid", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_code", property="channelErrCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_msg", property="channelErrMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_succ_time", property="refundSuccTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    RefundOrder selectByPrimaryKey(String refundOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=RefundOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") RefundOrder record, @Param("example") RefundOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=RefundOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") RefundOrder record, @Param("example") RefundOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=RefundOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(RefundOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_refund_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_refund_order",
        "set pay_order_id = #{payOrderId,jdbcType=VARCHAR},",
          "channel_pay_order_no = #{channelPayOrderNo,jdbcType=VARCHAR},",
          "mch_id = #{mchId,jdbcType=VARCHAR},",
          "mch_refund_no = #{mchRefundNo,jdbcType=VARCHAR},",
          "channel_id = #{channelId,jdbcType=VARCHAR},",
          "pay_amount = #{payAmount,jdbcType=BIGINT},",
          "refund_amount = #{refundAmount,jdbcType=BIGINT},",
          "currency = #{currency,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "result = #{result,jdbcType=TINYINT},",
          "client_ip = #{clientIp,jdbcType=VARCHAR},",
          "device = #{device,jdbcType=VARCHAR},",
          "remark_info = #{remarkInfo,jdbcType=VARCHAR},",
          "channel_user = #{channelUser,jdbcType=VARCHAR},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "channel_mchid = #{channelMchid,jdbcType=VARCHAR},",
          "channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
          "channel_err_code = #{channelErrCode,jdbcType=VARCHAR},",
          "channel_err_msg = #{channelErrMsg,jdbcType=VARCHAR},",
          "extra = #{extra,jdbcType=VARCHAR},",
          "notify_url = #{notifyUrl,jdbcType=VARCHAR},",
          "param1 = #{param1,jdbcType=VARCHAR},",
          "param2 = #{param2,jdbcType=VARCHAR},",
          "expire_time = #{expireTime,jdbcType=TIMESTAMP},",
          "refund_succ_time = #{refundSuccTime,jdbcType=TIMESTAMP},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where refund_order_id = #{refundOrderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(RefundOrder record);
}